﻿//using System;
//using System.Drawing;
//using System.Collections;
//using System.ComponentModel;
//using System.Windows.Forms;
//using System.Data;
//using System.IO;
//using System.Xml;
//using System.Xml.Serialization;
//using UTorrentMC.Code;

//namespace UTorrentMC.Code {
//public class Form1 : Form {
//private Label lblTitle;
//private Label lblCopyright;
//private Button btnSave;
//private TextBoxtxtInput;
//    readonly string filepath = "c:\\test.xml";

//    private void Form1_Load(object sender, System.EventArgs e) 
//    {Configcf = new Config();
//        XmlSerializer ser = new XmlSerializer(typeof(Config));
//        if (File.Exists(filepath)) 
//        {FileStreamfs = new FileStream(filepath, FileMode.Open);
//            cf = (Config)ser.Deserialize(fs);
//            lblTitle.Text = cf.WindowTitle;
//            lblCopyright.Text = cf.CopyrightText;
//            txtInput.Text = cf.CustomText;
//            fs.Close();
//    }
//        else 
//        {
//            FileStreamfs = new FileStream(filepath, FileMode.CreateNew);
//            lblTitle.Text = "TechRepublic.com Test Application";
//            lblCopyright.Text = "2005";
//            TextWritertw = new StreamWriter(fs);
//            ser.Serialize(tw, cf);
//            tw.Close();
//            fs.Close();
//} }
//private void btnSave_Click(object sender, System.EventArgs e) {Configcf = new Config();cf.CopyrightText = lblCopyright.Text;cf.WindowTitle = lblTitle.Text;cf.CustomText = txtInput.Text;XmlSerializer ser = new XmlSerializer(typeof(Config));TextWritertw = new StreamWriter(filepath, false);ser.Serialize(tw, cf);tw.Close();
//} } }
